package org.kealinghornets.nxtdroid;

import org.kealinghornets.nxtdroid.NXT.LightSensor;
import org.kealinghornets.nxtdroid.NXT.NXTThread;
import org.kealinghornets.nxtdroid.NXT.TouchSensor;

/**
 * Created by jychuah on 11/3/13.
 */
public class MyNXTThread extends NXTThread {

    public MyNXTThread() {
        setNXTThreadName("the thing that looks for the light");
    }

    public void run() {
        LightSensor halo = getLightSensor (PORT_1);
         int lightValue= 0;

       while (lightValue < 1023) {
           log("light value:"+ lightValue);
           wait(3000);
           lightValue= halo.getLightValue();
           runMotor(PORT_C);
           wait(100);
           stopMotor(PORT_C);
       }
        log ("u broke me, light level is" + lightValue);
        wait(5000);
        log ("#~=[,,_,,]:3 FTW!!!!!!!!!!!!!!!!!!!!!!!!!!");
        wait(120);
        log ("lel");
        reset();
    }


}
